#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# @Time    : 2023/5/5 10:38
# @Author  : Junzhao
# @File    : 删.py
# @Software: PyCharm
import pymysql

# 链接MySQL
conn = pymysql.connect(host="127.0.0.1", port=3306, user='root', password="", charset='utf8', db='unicom')

cursor = conn.cursor(cursor=pymysql.cursors.DictCursor)

cursor.execute("delete from admin where id=%s", [8])
conn.commit()

# 关闭连接
cursor.close()
conn.close()
